import { CopyInfoPanelBase } from "../copy/CopyInfoPanelBase";
import { SCrossGuildWarLeftNum } from "../../../../Message/Public/SCrossGuildWarLeftNum";
import { Language } from "../../../../extend/language/Language";
import { SCrossGuildWarScore } from "../../../../Message/Public/SCrossGuildWarScore";
import { GlobalStyle } from "../../../common/global/GlobalStyle";
import { ObjCreate } from "../common/ObjCreate";
import { SecTimerView } from "../common/SecTimerView";
import { GTextFiled } from "../../../../com/mui/controls/GTextFiled";
type int = number;
//class CrossGuildWarCopyInfoPanel
    
    export  class CrossGuildWarCopyInfoPanel extends CopyInfoPanelBase
    {
        constructor(arg1: string="MagicTowerInfoButtonBg")
        {
            super(arg1);
            return;
        }

        public updateEndTime(arg1: int): void
        {
            this._txtEndTimer.setLeftTime(arg1);
            return;
        }

        public updateData(arg1: SCrossGuildWarLeftNum): void
        {
            var loc2=null;
            if (arg1 == null) 
            {
                return;
            }
            this._txtSelfGuildLeftNum.text = Language.getStringByParam(80582, arg1.num);
            var loc1=0;
            if (arg1.enemyNum != null) 
            {
                var loc3=0;
                var loc4=arg1.enemyNum;
                for(loc2 of loc4) 
                {
                    loc1 = loc1 + loc2.num;
                }
            }
            this._txtEnemyGuildLeftNum.text = Language.getStringByParam(80583, loc1);
            return;
        }

        public updateData2(arg1: SCrossGuildWarScore): void
        {
            if (arg1 == null) 
            {
                return;
            }
            this._txtLeftTimes.htmlText = Language.getStringByParam(41836, arg1.leftReviveTimes.toString());
            return;
        }

        protected /* override */ createChildren(): void
        {
            super.createChildren();
            var loc1=GlobalStyle.textFormat6;
            loc1.size = 14;
            this._txtEndTimer = ObjCreate.createSecTimeView(Language.getString(80456), 12, 8, 200, 20, _bodySp, loc1);
            this._txtSelfGuildLeftNum = ObjCreate.createGTextField("", 12, 30, 200, 20, _bodySp);
            this._txtEnemyGuildLeftNum = ObjCreate.createGTextField("", 12, 50, 200, 20, _bodySp);
            this._txtLeftTimes = ObjCreate.createGTextField("", 12, 70, 200, 20, _bodySp);
            return;
        }

        public clear(): void
        {
            this._txtSelfGuildLeftNum.htmlText = "";
            this._txtEnemyGuildLeftNum.htmlText = "";
            this._txtLeftTimes.htmlText = "";
            return;
        }

        /* internal */ /* var */_txtEndTimer: SecTimerView;

        /* internal */ /* var */_txtLeftTimes: GTextFiled;

        /* internal */ /* var */_txtSelfGuildLeftNum: GTextFiled;

        /* internal */ /* var */_txtEnemyGuildLeftNum: GTextFiled;
    }
